package com.hualan.sfzy.controller;

import com.hualan.sfzy.entity.UserOrder;
import com.hualan.sfzy.service.UserOrderService;
import com.hualan.sfzy.utils.Result;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController()
@RequestMapping("/user-order")
public class UserOrderController {
    @Autowired
    UserOrderService userOrderService;

    @GetMapping("/findUserOrderAndCounselor")
    public Result findUserOrderAndCounselor(Integer id) {
        List<UserOrder> list = userOrderService.findUserOrderAndCounselorById(id);
        return Result.success(list);
    }
}
